package org.yenn.pattern.observer.common;

import lombok.Getter;

/**
 * @Author: yerenyun
 * @Description: 具体的目标对象, 负责把有关状态存入到相应的观察者对象中
 * 天气预报就是具体的目标对象
 */
public class ConcreteSubject extends Subject {

    // 目标对象的状态
    @Getter
    private String subjectState;

    public void setSubjectState(String subjectState) {
        this.subjectState = subjectState;
        this.notifyObservers();
    }
}
